/**
 * desc：  初始化页面
 * author：fdy
 * date：  2020/3/14 10:57 上午
 */
import React, {Component} from 'react';
import RNBootSplash from "react-native-bootsplash";
import {Root} from './src/router'
import AsyncStorage from '@react-native-community/async-storage';

export default class App extends Component {
    state = {auth: false}

    componentDidMount(): void {
        AsyncStorage.getAllKeys(res => {
            console.log('-1-', res)
        })
        AsyncStorage.getItem('root', (e) => {
            console.log('--', e)
            this.setState({
                auth: e
            }, () => {
                RNBootSplash.hide({duration: 250}); // fade
            })
        })
    }

    render() {
        return <Root/>
    }
}


